import Vue from 'vue'
import VueRouter from 'vue-router'
// import LayoutView from '@/views/LayoutView.vue'

Vue.use(VueRouter)

// 静态路由 - 没有登陆之前所有使用者都能访问的路由
const constantRouterMap = [
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/LoginView.vue'),
    meta: { title: '管理员登录' },
    hidden: true
  },
  {
    path: '/forget',
    name: 'forget',
    component: () => import('@/views/ForgetPassword.vue'),
    hidden: true
  },
  {
    path: '/404',
    name: '404',
    component: () => import('@/views/NotFound.vue'),
    hidden: true
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: constantRouterMap
});

export default router
